<template>
  <div id="app">
    <nav>
      <el-container style="height: 900px; border: 1px solid #eee; ">
        <el-aside width="200px" style="background-color: rgb(238, 241, 246)">
          <el-menu :default-openeds="['1', '3']"
                   default-active="2"
                   class="el-menu-vertical-demo"
                   style="height:100%"
                   @select="menu">
            <el-menu-item-group>
              <el-menu-item>
                <template slot="title"><h2>审核系统</h2></template>
              </el-menu-item>

              <el-menu-item index="1">
                <template slot="title"><i class="el-icon-user-solid"></i><span slot="title">客户审核</span></template>
              </el-menu-item>

             <el-menu-item index="2">
                <template slot="title"><i class="el-icon-s-custom"></i><span slot="title">供应商审核</span></template>
              </el-menu-item>

              <el-menu-item index="3">
                <template slot="title"><i class="el-icon-s-fold"></i><span slot="title">订单管理</span></template>
              </el-menu-item>

              <el-menu-item index="4">
                <template slot="title"><i class="el-icon-message-solid"></i><span slot="title">供货结算</span></template>
              </el-menu-item>

              <el-submenu index="5">
                <template slot="title"><i class="el-icon-message"></i><span slot="title">预存款结算</span></template>
                <el-menu-item index="5-1">预存款充值</el-menu-item>
                <el-menu-item index="5-2">预存款预购</el-menu-item>
              </el-submenu>

              <el-submenu index="6">
                <template slot="title"><i class="el-icon-s-check"></i><span slot="title">退货管理</span></template>
                <el-menu-item index="6-1">供货商退货</el-menu-item>
                <el-menu-item index="6-2">供货商退货详情</el-menu-item>
                <el-menu-item index="6-3">用户退款详情</el-menu-item>
              </el-submenu>

              <el-submenu index="7">
                <template slot="title"><i class="el-icon-user"></i><span slot="title">促销管理</span></template>
                <el-menu-item index="7-1">促销审核</el-menu-item>
                <el-menu-item index="7-2">促销详情</el-menu-item>
              </el-submenu>

              <el-submenu index="8">
                <template slot="title"><i class="el-icon-shopping-cart-full"></i><span slot="title">采购管理</span></template>
                <el-menu-item index="8-1">采购审核</el-menu-item>
                <el-menu-item index="8-2">招标</el-menu-item>
              </el-submenu>

              <el-menu-item index="9">
                <template slot="title"><i class="el-icon-s-finance"></i><span slot="title">报价审核</span></template>
              </el-menu-item>

              <el-menu-item index="10">
                <template slot="title"><i class="el-icon-s-finance"></i><span slot="title">用户冻结审核</span></template>
              </el-menu-item>

            </el-menu-item-group>
          </el-menu>
        </el-aside>

        <el-container>
          <el-header style="text-align: right; font-size: 12px;background-color: #f8f8f8; line-height:60px">
            <span style="position: relative;right: 800px;font-family: Gabriola;font-size: 20px">审核系统</span>
          </el-header>

          <!--页面区-->
          <el-main>
            <router-view/>
          </el-main>

        </el-container>
      </el-container>
    </nav>
  </div>
</template>

<script>
export default {
  name: 'App',
  methods:{
    menu(index){
      console.log(index)
      switch (index){
        case '1':this.$router.push("/useraudit");break
        case '2':this.$router.push("/provideraudit");break
        case '3':this.$router.push("/orderCopy");break
        case '4':this.$router.push("/providerOrderWebSocket");break
        case '5-1':this.$router.push("/FrontRechargeRecord2");break
        case '5-2':this.$router.push("/UserOrder");break
        case '6-1':this.$router.push("/SupplierreturnSell");break
        case '6-2':this.$router.push("/Supplierreturn");break
        case '6-3':this.$router.push("/Refunds");break
        case '7-1':this.$router.push("/Ssalegoodsdecision");break
        case '7-2':this.$router.push("/Sslegoods");break
        case '8-1':this.$router.push("/poAuditWebSocket");break
        case '8-2':this.$router.push("/buyMessage");break
        case '9':this.$router.push("/buyMessageOffer");break
        case '10':this.$router.push("/userFreezeWebSocket");break
      }
    }
  }
}
</script>
<style>

</style>
